<template>
    <view>
        <pop-manager :show="show" :type="type" :show-overlay="overlay" @clickmask="handleMaskClick">
            <slot></slot>
        </pop-manager>
    </view>
</template>

<script>
'use strict';
import popManager from "@/components/pop-manager/c_pop-manager.vue";
export default {
    components: {
        popManager
    },
    data() {
        return {};
    },
    props: {
        show: {
            type: Boolean,
            default: false
        },
        overlay: {
            type: Boolean,
            default: true
        },
        closeOnClickOverlay: {
            type: Boolean,
            default: true
        },
        // 弹出方向
        type: {
            type: String,
            default: 'center'
        }
    },
    methods: {
        handleMaskClick: function () {
            this.$emit('click-overlay', {
                detail: {}
            });
            if (!this.closeOnClickOverlay) {
                return;
            }
            this.$emit('close', {
                detail: {}
            });
        }
    },
    created: function () {}
};
</script>
<style>
</style>
